function checkboxs(){

	var	checkbox = document.getElementsByClassName('checkedse');

	var num = true;

	for(var i = 0; i < checkbox.length; i++){

		if(checkbox[i].checked){

			checkbox[i].checked = false;
		}else{

			checkbox[i].checked = true;
		}
	}
	
}


function filePre(){

	var file_box = document.getElementById('arrImg'),
		file     = document.getElementById('myfile'),
		fileImg  = file_box.getElementsByTagName('img')[0];
	// var url = window.createObjectURL(file.files);
		console.log(file.files[0]);
}

function removeBatch(url){

	var	checkbox = document.getElementsByClassName('checkedse');
	var arr = [];

	for(var i = 0;i < checkbox.length;i++){

		arr.push(checkbox[i].value);
	}

	ajax.post(url, {'id':arr}, function(res){

		console.log(res);
	}, 'json');
}

// 显示与隐藏删除按钮
function showDel(){

	var tbody = document.getElementById('myTbody');
	var tr = tbody.getElementsByTagName('tr');
	var del = document.getElementsByClassName('del');

	for(var i = 0; i < tr.length; i++){
		tr[i].index = i;
		tr[i].onmouseover = function(){

			var otherIndex = PARSING.otherIndex({"index":this.index, "element":del});
			del[this.index].style.display = "inline-block";
			for(var i = 0; i < otherIndex.length; i++){

				del[otherIndex[i]].style.display = "none";
			}
		}
	}

	// 指针离开tbody删除按钮消失
	tbody.onmouseout = function(){

		for(var i = 0; i < del.length; i++){

			del[i].style.display = "none";
		}
	}
}